package com.zhan.ielts.enums;

public enum XingGeProductEnum {
	//android
	ACCESS_ID_IELTSTIKU_ANDROID("ieltstiku_android",2100203914L,"cf0c95ec951157ab3ce9981da5d0c754"),
	ACCESS_ID_IELTSWORD_ANDROID("ieltsword_android",2100203913L,"25c582ff09b1b9dc2fedac59c9e52c3c"),
	ACCESS_ID_TPOWORD_ANDROID("tpoword_android",2100203755L,"f395337cf1857e357c00640737a98bfe"),
	ACCESS_ID_TPO_ANDROID("tpo_android",2100124710L,"018d74f1fc0d973c2557153bbd935cf9"),
	
	//iso
	ACCESS_ID_IELTSTIKU_ISO("ieltstiku_iPhone",2200183461L,"e31dbad1123d9025090e1f5268c6cd95"),
	ACCESS_ID_IELTSWORD_ISO("ieltsword_iPhone",2200183473L,"b5604e82cd4f7f764200074a1ef210f8"),
	ACCESS_ID_TPOWORD_ISO("tpoword_iPhone",2200207417L,"72fe6a133583a3b555ec29b41898d677"),
	ACCESS_ID_TPO_ISO("tpo_iPhone",2200129938L,"7aaac6854da46ca4dda93ab1f59fb444"),
	ACCESS_ID_TPO_IPAD("tpo_iPad",2200124738L,"de6a48f21bcd06d06ead383e7f6c4fa9");
    private String appName;
	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	private Long accessId;// ACCESS_ID;
	private String secretKey;// SECRET_KEY

	private XingGeProductEnum(String appName,Long accessId, String secretKey) {
		this.appName=appName;
		this.accessId = accessId;
        this.secretKey=secretKey;
	}

	public Long getAccessId() {
		return accessId;
	}

	public void setAccessId(Long accessId) {
		this.accessId = accessId;
	}

	public String getSecretKey() {
		return secretKey;
	}

	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}
	public static XingGeProductEnum getEnumByAppName(String appName){
		for(XingGeProductEnum e:XingGeProductEnum.values()){
			if(e.getAppName().equals(appName)){
				return e;
			}
		}
		return null;
	}
}
